import request from '@/utils/request'

var Http = {}
Http.get = function (url, params = { page: 1, limit: 10 }) {
  return request({
    url: url,
    method: 'get',
    params
  })
}
Http.post = function (url, params) {
  return request({
    url: url,
    method: 'post',
    params
  })
}
Http.put = function (url, params) {
  return request({
    url: url,
    method: 'put',
    params
  })
}
Http.delete = function (url, params) {
  return request({
    url: url,
    method: 'delete',
    params
  })
}
Http.request = function (url, method, params) {
  return request({
    url: url,
    method: method,
    params
  })
}

export default Http
